<template>
  <div class="tabs">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item
        v-for="item in text"
        :key="item.id"
        :index="item.id"
        @click="jumpToChild(item.url)"
        >{{ item.textName }}</el-menu-item
      >
    </el-menu>

    <div class="search">
      <slot>
        <button @click="deletedfhui" class="deleted-fhui">返回</button>
      </slot>
    </div>
  </div>
</template>


<script>
export default {
  data() {
    return {
      activeIndex: "0",
    };
  },
  props: {
    text: Array,
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    jumpToChild(url) {
      this.$router.push(url);
    },
    deletedfhui(){
        this.$router.push('/callback/deleted');
    }
  },
};
</script>

<style lang="scss" scoped>
.tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding-right: 10px;
  background-color: #545c64;
}
a:-webkit-any-link {
  text-decoration: none;
}
.deleted-fhui{
    padding: 5px 10px;
}
</style>